from multiprocessing import Process
from .WbSpider import key_spider, hat_spider
from .spiders import zg_spider, dan_spider


def key_start(name, username, s_id, key):
    p = Process(target=key_spider, args=(10, key, name, username, s_id))
    p.start()


def start(name, username, s_id):
    Process(target=hat_spider, args=(10, name, username, s_id)).start()


def zgxw_start(name, username, s_id):
    Process(target=zg_spider, args=(name, username, s_id)).start()


def dan_start(name, username, s_id, key):
    Process(target=dan_spider, args=(name, username, s_id, key)).start()
